{% extends 'base.html' %}


{% block titles %}
<title>
    寒门客-搜索获取网易云音乐数据
</title>

{% endblock %}



{% block app_content %}
<div class="container">
<div class="row">

<center>
<form action="" method="post">
      {{ form.hidden_tag() }}
    <h2>{{ form.username.label() }}<br>
        {{ form.username(size=60) }}
    </h2>
    <h3 style="color:blue">{{ form.submit() }}</h3>
  </form>

    <br>
    <br>

{% if codes == 200 %}
<table class="table table-bordered">
    <thead>
      <tr>
        <th>歌名</th>
        <th>歌链接</th>
        <th>歌手名称</th>
          <th>歌手链接</th>
      </tr>
    </thead>
    <tbody>
    {% for im in alist %}
      <tr>
        <td>{{ im['歌名'] }}</td>
          <td><a href="https://music.163.com/#/song?id={{ im['歌名id'] }}" target="_blank">点击播放</a>--歌id={{ im['歌名id'] }}</td>
        <td>{{ im['歌手名称'] }}</td>
          <td><a href="https://music.163.com/#/artist?id={{ im['歌手id'] }}" target="_blank">点击查看</a>--歌手id={{ im['歌手id'] }}</td>
      </tr>
      {% endfor %}
    </tbody>
</table>

<br>
    <hr>
{% endif %}
      <h2  class="text-center">作者的抖音二维码:</h2>
  <img src="{{ url_for('static',filename='images/douyinss.png') }}" alt="搜索获取网易云音乐数据" width="50%" height="50%"/>
    </center>
</div>
</div>

{% endblock %}